import React, { Component } from 'react';

export default class MenuExampleColoredInverted extends Component {
  state = { hover: false };
  handleMouseInter = () => this.setState({ hover: true })
  handleMouseLeave = () => this.setState({ hover: false })
  render() {
    const { hover } = this.state;
    const { children, active,title } = this.props;
    let classString = "label-item label-buttonItem ";
    if (hover === true) {
      classString += "label-itemHover ";
    }
    if (active) {
      classString += "label-itemActive ";
    }
    return (
      <React.Fragment>
        <a
          className={classString}
          onMouseEnter={() => this.handleMouseInter()}
          onMouseLeave={() => this.handleMouseLeave()}
        >
          {children}
          <span className="label-label label-vam">
            <span className="label-lblContent">
              <span className="label-lblText">{title}</span>
            </span>
          </span>
        </a>
        <b className="label-clear" />
      </React.Fragment>
    );
  }
}